/*
  {
    "records": [
      {
        "id": 104,
        "spuName": "iefh",
        "description": "的萨芬",
        "category3Id": 61,
        "tmId": 1,
        "spuSaleAttrList": null,
        "spuImageList": null
      }
    ],
    "total": 16,
    "size": 3,
    "current": 1,
    "searchCount": true,
    "pages": 6
  }
*/

export interface SpuSaleAttrValueModel {
  baseSaleAttrId?: number;
  id?: number;
  isChecked?: string;
  saleAttrName?: string;
  saleAttrValueName: string;
  spuId?: number;
  uid?: number;
}

export type SpuSaleAttrValueListModel = SpuSaleAttrValueModel[];

export interface SpuSaleAttrModel {
  baseSaleAttrId: number;
  id?: number;
  saleAttrName: string;
  spuId?: number;
  spuSaleAttrValueList: SpuSaleAttrValueListModel;
  isShowEdit?: boolean;
}

export type SpuSaleAttrListModel = SpuSaleAttrModel[];

export interface SpuImageModel {
  id?: number;
  imgName: string;
  imgUrl: string;
  spuId?: number;
}

export type SpuImageListModel = SpuImageModel[];

export interface NoImageSpuModel {
  id?: number;
  spuName: string;
  description: string;
  category3Id?: number;
  tmId: number | undefined;
  spuSaleAttrList: SpuSaleAttrListModel;
}

export interface SpuModel extends NoImageSpuModel {
  spuImageList: SpuImageListModel;
}

export type SpuListModel = SpuModel[];

export interface GetSpuListResultModel {
  records: SpuListModel;
  total: number;
}

export interface GetSpuListParamsModel {
  page: number;
  limit: number;
  category3Id: number;
}

/*
  [
    {
      "id": 1,
      "name": "颜色"
    },
  ]
*/

export interface BaseSaleAttrModel {
  id: number;
  name: string;
}

export type BaseSaleAttrListModel = BaseSaleAttrModel[];
